import request from '@/utils/request.js'

// 获取分类列表
export const getCategoryListService = () => {
    return request.get('/category/list')
}

// 添加分类
export const addCategoryService = (category) => {
    return request.post('/category/add', category)
}

// 编辑分类
export const editCategoryService = (category) => {
    return request.put('/category/update', category)
}

// 删除分类
export const deleteCategoryService = (id) => {
    return request.delete(`/category/delete/${id}`)
}